#!/bin/sh
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
ROOT_DIR=`cd $(dirname $0)/..; pwd`
VARNISH_NAME=$ROOT_DIR/bin

date -u

ulimit -SHn 51200
varnishd \
-a 172.24.19.207:80 \
-i image_xml_cache \
-n $VARNISH_NAME \
-P $ROOT_DIR/bin/varnishd.pid \
-s file,$ROOT_DIR/cache/cache.dat,1G \
-f $ROOT_DIR/bin/vcl.conf \
-p thread_pool_min=50 \
-p thread_pool_max=1500 \
-p thread_pools=2 \
-p listen_depth=512 \
-p client_http11=on \
-p lru_interval=20 \
-h classic,500009 \
-T 127.0.0.1:5000

# set log
varnishncsa  \
-n $VARNISH_NAME \
-P $ROOT_DIR/bin/varnishncsa.pid \
-a -w $ROOT_DIR/log/varnish.log &
